
execfile('__init__.py')


Domain()

Node(1, 0, 0, 0)
Node(2, 1, 0, 0)
Node(3, 0, 0, 2)

GeometricTransformation(1, 'Corotational', 1, 0, 0)
GeometricTransformation(2, 'PDelta', 1, 0, 0)

uniaxialMaterial.Elastic(1, 205000)
uniaxialMaterial.Elastic(2, 206000)
uniaxialMaterial.ElasticPP(3, 205000, 0.001)
uniaxialMaterial.ElasticPP(4, 205000, 0.001, -0.0005)
uniaxialMaterial.ElasticPP(5, 205000, 0.001, eps0=0.001)
uniaxialMaterial.Steel01(6, 345, 205000, 0.01)

NDMaterial.ElasticIsotropic(7, 205000, 0.2)
NDMaterial.DruckerPrager(8, 185000, 90000, 345, 0, 0, 1, 1, 0.1, 0.1, 1850, 0.1, 0)
NDMaterial.DruckerPrager(9, 185000, 90000, 390, 0, 0, 1, 1, 0.1, 0.1, 1850, 0.2, 0)

NDMaterial.PlateFiberMaterial(1007, 7)
NDMaterial.PlateFiberMaterial(1008, 8)
NDMaterial.PlateFiberMaterial(1009, 9)

LineElement.ElasticBeamColumn(1, 1, 2, 0.1, 205000, 109000, 0.02, 0.01, 0.01, 1)
LineElement.ElasticBeamColumn(2, 2, 3, 0.1, 205000, 109000, 0.02, 0.01, 0.01, 2)

Patch1 = RectPatch(3, 10, 9, -10, -20, 10, 20)
Patch2 = RectPatch(6, 10, 9, -30, -40, 10, 20)
Patch3 = RectPatch(5, 5, 5, 10, 20, 30, 40)
#print(type(Patch1.command1()))
#print(type(Patch2.command1()))
Fiber1 = Fiber(1, [Patch1, Patch2])
Fiber2 = Fiber(2, [Patch2, Patch3])
Section.Fiber(1, Fiber1)
Section.Fiber(2, [Fiber1, Fiber1, Fiber1, Fiber2, Fiber2, Fiber2, Fiber2], 7)
Section.Elastic(3, 205000, 0.1, 0.01, 0.01, 105001, 0.02, 7)
Section.SectionAggregator(4, [1, 4, 6], ['P', 'T', 'My'], 2, 7, [0, 1, 5, 6])

Int1 = BeamIntegration.Lobatto()
Int2 = BeamIntegration.FixedLocation(7)
Int3 = BeamIntegration.FixedLocation(7, [0, 0.1, 0.2, 0.3, 0.7, 0.8, 1])

WriteCpp('main.cpp').WriteCommands()